﻿/**
 * 程序名称：任务执行框架JJYChengTaskWinForm-
 * 作者：jjycheng
 * 博客：https://blog.csdn.net/cplvfx
 * gitee:https://gitee.com/jjycheng
 **/
using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JJYChengTaskWinForm.Factory.Test.Models
{
    [SugarTable("sys_dept", "部门配置表")]
    public class SysDept
    {
        /// <summary>
        /// 部门ID
        /// </summary> 
        public long DeptId { get; set; }

        /// <summary>
        /// 父部门ID
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 祖级列表
        /// </summary>
        public string Ancestors { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary> 
        public string DeptName { get; set; }

        /// <summary>
        /// 显示顺序
        /// </summary>
        public int OrderNum { get; set; }

        /// <summary>
        /// 负责人
        /// </summary> 
        public string Leader { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary> 
        public string Phone { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary> 
        public string Email { get; set; }

        /// <summary>
        /// 部门状态:0正常,1停用
        /// </summary> 
        public int Status { get; set; }

        /// <summary>
        /// 删除标志（0代表存在 2代表删除）
        /// </summary>
        [SugarColumn(DefaultValue = "0")]
        public int DelFlag { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(IsOnlyIgnoreUpdate = true, Length = 64, IsNullable = true)]
        [JsonProperty(propertyName: "createBy")] 
        public string Create_by { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(IsOnlyIgnoreUpdate = true, IsNullable = true, InsertServerTime = true)]
        [JsonProperty(propertyName: "createTime")] 
        public DateTime Create_time { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新人
        /// </summary>
        [JsonIgnore]
        [JsonProperty(propertyName: "updateBy")]
        [SugarColumn(IsOnlyIgnoreInsert = true, Length = 64, IsNullable = true)] 
        public string Update_by { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        //[JsonIgnore]
        [SugarColumn(IsOnlyIgnoreInsert = true, IsNullable = true, UpdateServerTime = true)]
        [JsonProperty(propertyName: "updateTime")] 
        public DateTime? Update_time { get; set; }
        [SugarColumn(Length = 500)]
        public string Remark { get; set; }
    }
}
